const { cleanDatEnglishText } = require("../src/utils/datTextCleaner");

// 测试^products$product$$$$$格式
const testCases = [
  {
    input: "^products$product$$$$$",
    description: "标准^word$word$$$$$格式",
  },
  {
    input: "^Please$please$$$$$^ ^give$give$$$$$^ ^our$our$$$$$^",
    description: "多个^word$word$$$$$^格式组合",
  },
  {
    input: "^as soon as possible$as soon as possible$$$$$^",
    description: "词组重复格式",
  },
  {
    input: "^test$testing$$$$$^",
    description: "词形变化格式",
  },
];

console.log("测试^格式处理:\n");

testCases.forEach((testCase, index) => {
  try {
    const result = cleanDatEnglishText(testCase.input);
    console.log(`测试 ${index + 1} (${testCase.description}):`);
    console.log(`  输入: "${testCase.input}"`);
    console.log(`  输出: "${result}"`);
    console.log("");
  } catch (error) {
    console.log(`测试 ${index + 1} (${testCase.description}) 出错:`, error.message);
    console.log("");
  }
});
